import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/extend_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class ExtendEntity {
	late int code;
	late String msg;
	late List<ExtendData> data;

	ExtendEntity();

	factory ExtendEntity.fromJson(Map<String, dynamic> json) => $ExtendEntityFromJson(json);

	Map<String, dynamic> toJson() => $ExtendEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ExtendData {
	@JSONField(name: "control_type")
	late String controlType;
	late String name;
	late String title;
	@JSONField(name: "item_option")
	late String itemOption;
	List<Map> datas = [];
	ExtendData();

	factory ExtendData.fromJson(Map<String, dynamic> json) => $ExtendDataFromJson(json);

	Map<String, dynamic> toJson() => $ExtendDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
